def collect_coverage_data():
    """收集代码覆盖率数据"""
    import coverage
    cov = coverage.Coverage()
    cov.start()
    # 执行测试
    cov.stop()
    return cov.report()